using System.Collections;
using System.Xml;
using Altova.TypeInfo;
using Altova.Xml;
using Altova.Xml.Meta;
using RDML_v1_2_REC.xs;

namespace RDML_v1_2_REC.rdml
{
	public class stepType : TypeBase
	{
		internal class Enumerator : EnumeratorBase
		{
			public override object Current
			{
				get
				{
					return new stepType((XmlNode)base.InnerCurrent);
				}
			}

			public Enumerator(IEnumerator inner)
				: base(inner)
			{
			}
		}

		public class MemberElement_nr : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public stepNumberTypeType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public stepNumberTypeType First
			{
				get
				{
					return new stepNumberTypeType(owner.GetElementFirst(info));
				}
			}

			public stepNumberTypeType Last
			{
				get
				{
					return new stepNumberTypeType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_nr(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public stepNumberTypeType At(int index)
			{
				return new stepNumberTypeType(owner.GetElementAt(info, index));
			}

			public stepNumberTypeType Append()
			{
				return new stepNumberTypeType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new stepNumberTypeType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_description : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public stringType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public stringType First
			{
				get
				{
					return new stringType(owner.GetElementFirst(info));
				}
			}

			public stringType Last
			{
				get
				{
					return new stringType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_description(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public stringType At(int index)
			{
				return new stringType(owner.GetElementAt(info, index));
			}

			public stringType Append()
			{
				return new stringType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new stringType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_temperature : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public temperatureType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public temperatureType First
			{
				get
				{
					return new temperatureType(owner.GetElementFirst(info));
				}
			}

			public temperatureType Last
			{
				get
				{
					return new temperatureType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_temperature(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public temperatureType At(int index)
			{
				return new temperatureType(owner.GetElementAt(info, index));
			}

			public temperatureType Append()
			{
				return new temperatureType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new temperatureType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_gradient : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public gradientType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public gradientType First
			{
				get
				{
					return new gradientType(owner.GetElementFirst(info));
				}
			}

			public gradientType Last
			{
				get
				{
					return new gradientType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_gradient(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public gradientType At(int index)
			{
				return new gradientType(owner.GetElementAt(info, index));
			}

			public gradientType Append()
			{
				return new gradientType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new gradientType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_loop : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public loopType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public loopType First
			{
				get
				{
					return new loopType(owner.GetElementFirst(info));
				}
			}

			public loopType Last
			{
				get
				{
					return new loopType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_loop(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public loopType At(int index)
			{
				return new loopType(owner.GetElementAt(info, index));
			}

			public loopType Append()
			{
				return new loopType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new loopType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_pause : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public pauseType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public pauseType First
			{
				get
				{
					return new pauseType(owner.GetElementFirst(info));
				}
			}

			public pauseType Last
			{
				get
				{
					return new pauseType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_pause(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public pauseType At(int index)
			{
				return new pauseType(owner.GetElementAt(info, index));
			}

			public pauseType Append()
			{
				return new pauseType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new pauseType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_lidOpen : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public lidOpenType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public lidOpenType First
			{
				get
				{
					return new lidOpenType(owner.GetElementFirst(info));
				}
			}

			public lidOpenType Last
			{
				get
				{
					return new lidOpenType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_lidOpen(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public lidOpenType At(int index)
			{
				return new lidOpenType(owner.GetElementAt(info, index));
			}

			public lidOpenType Append()
			{
				return new lidOpenType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new lidOpenType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public MemberElement_nr nr;

		public MemberElement_description description;

		public MemberElement_temperature temperature;

		public MemberElement_gradient gradient;

		public MemberElement_loop loop;

		public MemberElement_pause pause;

		public MemberElement_lidOpen lidOpen;

		public static ComplexType StaticInfo
		{
			get
			{
				return new ComplexType(RDML_v1_2_REC_TypeInfo.binder.Types[RDML_v1_2_REC_TypeInfo._altova_ti_rdml_altova_stepType]);
			}
		}

		public stepType(XmlNode init)
			: base(init)
		{
			instantiateMembers();
		}

		private void instantiateMembers()
		{
			nr = new MemberElement_nr(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_stepType_altova_nr]);
			description = new MemberElement_description(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_stepType_altova_description]);
			temperature = new MemberElement_temperature(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_stepType_altova_temperature]);
			gradient = new MemberElement_gradient(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_stepType_altova_gradient]);
			loop = new MemberElement_loop(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_stepType_altova_loop]);
			pause = new MemberElement_pause(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_stepType_altova_pause]);
			lidOpen = new MemberElement_lidOpen(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_stepType_altova_lidOpen]);
		}

		public void SetXsiType()
		{
			XmlTreeOperations.SetAttribute(base.Node, "xsi:type", "http://www.w3.org/2001/XMLSchema-instance", new XmlQualifiedName("stepType", "http://www.rdml.org"));
		}
	}
}
